<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  var playCount1=13687
  var playCount2=5433322
  var playCount3=876663333
  //封装一个工具函数：对数字进行格式化
  function formatCount(count) {
    var result
    if(count>10_0000_0000){
      result=Math.floor(count/1_0000_0000)+"亿"
      
    }else if(count>10_0000){
      result=Math.floor(count/10_000)+"万"
    }else{
    result=count
    }
    return result
  }
  
  console.log(formatCount(playCount1))
  console.log(formatCount(playCount2))
  console.log(formatCount(playCount3))
  
  </script>
</body>
</html>